package com.neusoft.mapping;

import com.neusoft.model.User;

import java.sql.ResultSet;
import java.sql.SQLException;

public class UserMapping implements EntityMapping {
    @Override
    public Object mapping(ResultSet rs) throws SQLException {
        User user = new User();
        user.setId(rs.getInt("id"));
        user.setUsername(rs.getString("username"));
        user.setPassword(rs.getString("password"));
        return user;
    }
}
